import { Module } from '@nestjs/common';
import { TemplateService } from './template.service';
import { TemplateController } from './template.controller';
import { ClientsModule, Transport } from '@nestjs/microservices';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserBehaviorModule } from '../user-behavior/user-behavior.module';

@Module({
  imports:[
    UserBehaviorModule,
      ClientsModule.registerAsync([{
          name: 'STORE_SERVICE',
          useFactory: () => ({
              transport: Transport.TCP,
              options: {
                  port: 9091,
                  retryAttempts: 5,
                  retryDelay: 3000
              }
          })
      }])
  ],
controllers: [TemplateController],
providers: [TemplateService],
exports: [TemplateService]  

})
export class TemplateModule {}
